package form;

import java.util.HashMap;

public class Form extends FormContainer
{
	static private HashMap<String, Form> forms = new HashMap<String, Form>();
	
	static public Form getForm(String id)
	{
		return forms.get(id);
	}
	
	public Form(String id)
	{
		setAttribute("method", "post");
		setAttribute("action", "");
		
		addClassName("generated-form");
		
		synchronized (forms)
		{
			forms.put(id, this);
		}
	}
	
	@Override
	public String getTagName()
	{
		return "form";
	}
}
